import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("address_scope_district", { schema: "cbox" })
export class AddressScopeDistrict {
  @PrimaryGeneratedColumn({ type: "int", name: "id" })
  id: number;

  @Column("varchar", { name: "name", length: 100 })
  name: string;

  @Column("varchar", { name: "district_code", length: 20 })
  districtCode: string;

  @Column("int", { name: "sort", nullable: true, default: () => "'0'" })
  sort: number | null;

  @Column("tinyint", {
    name: "enabled",
    nullable: true,
    width: 1,
    default: () => "'1'",
  })
  enabled: boolean | null;

  @Column("int", { name: "city_id" })
  cityId: number;
}
